createElement
ReactElement
通过createElement
创建
该方法需要传入三个参数:
- type
- config
- children
1 | export function createElement(type, config, children) { |
ReactElement
返回一个存储节点信息的对象
1 | const ReactElement = function(type, key, ref, self, source, owner, props) { |
Component
1 | function Component(props, context, updater) { |
PureComponent
继承于Component
1 | function ComponentDummy() {} |
createRef
1 | export function createRef(): RefObject { |
forwardRef
1 | export default function forwardRef<Props, ElementType: React$ElementType>( |
Contenxt
createContext
1 | export function createContext<T>( |
ReactChildren
1 | ... |